#ifndef WIFIUI_H
#define WIFIUI_H

#include <QDialog>
#include <QLineEdit>
#include <QLabel>
#include <QComboBox>
#include <QSet>
#include <QPushButton>
class WifiUI : public QDialog
{
    Q_OBJECT
public:
    explicit WifiUI(QWidget *parent = 0);
    ~WifiUI();
    void GetWifiStatus(bool);
protected:
    bool eventFilter(QObject *watched, QEvent *event);
signals:
    void SendConnectStatus(bool);
    void    CallKeyBoard(const QString&,int);
public slots:
    void    ReceiveKeyBoardData(const QString&,const QString&);
    void    SwitchLang(int type);
    void    ScanWifis();
private:
    void    SendSystemCmd(const QString& cmd);
    void    DisConnectWifi(const QString &SSID);
    bool    ConnectWifi(const QString& SSID,const QString& wlanName,const QString& Passwd);
    QSet<QString> ScanWifiDevice();
private:
    int     m_langType;
    QPushButton *m_Connect;
    QPushButton *m_Cancel;
    QLineEdit *m_editPasswd;
	QLineEdit *m_editIp;
    QComboBox *m_ComboxSSID;
    QLabel *m_labelIp;
    QLabel *m_labelPort;
    QLabel *m_labelNote;
    QString m_wlanName;
    bool    m_wifiStatus;
};

#endif // WIFIUI_H
